package com.photoeditor.demo.model.bean.stash;

import android.graphics.RectF;
import android.os.Parcel;
import android.os.Parcelable;

import com.photoeditor.demo.model.bean.EmojiBean;

/**
 * Created by Administrator on 2017/7/12 0012.
 */

public class StickerTransferBean implements Parcelable{

    //sticker
    private EmojiBean mEmojiBean;
    //gif
    private String filepath;
    //AR
    private int dayOfWeek;
    private int month;
    private int dayOfMonth;
    //AR
    private int minute;
    private int hour;
    private int hourOfDay;
    private int amPm;

    private RectF mRect;
    private float mDegree;
    private int type;

    public StickerTransferBean(int type, EmojiBean emojiBean, RectF rect, float degree) {
        this.type = type;
        mEmojiBean = emojiBean;
        mRect = rect;
        mDegree = degree;
    }

    public StickerTransferBean( int type, String filepath, RectF rect, float degree) {
        mRect = rect;
        mDegree = degree;
        this.type = type;
        this.filepath = filepath;
    }

    public StickerTransferBean(int type, RectF rect, float degree, int minute, int hour, int hourOfDay, int amPm) {
        this.minute = minute;
        this.hour = hour;
        this.hourOfDay = hourOfDay;
        this.amPm = amPm;
        mRect = rect;
        mDegree = degree;
        this.type = type;
    }

    public StickerTransferBean(int type, RectF rect, float degree, int dayOfWeek, int month, int dayOfMonth) {
        this.dayOfWeek = dayOfWeek;
        this.month = month;
        this.dayOfMonth = dayOfMonth;
        mRect = rect;
        mDegree = degree;
        this.type = type;
    }

    protected StickerTransferBean(Parcel in) {
        mEmojiBean = in.readParcelable(EmojiBean.class.getClassLoader());
        mRect = in.readParcelable(RectF.class.getClassLoader());
        mDegree = in.readFloat();
        type = in.readInt();
        filepath = in.readString();
        minute = in.readInt();
        hour = in.readInt();
        hourOfDay = in.readInt();
        amPm = in.readInt();
        dayOfWeek = in.readInt();
        month = in.readInt();
        dayOfMonth = in.readInt();
    }

    public static final Creator<StickerTransferBean> CREATOR = new Creator<StickerTransferBean>() {
        @Override
        public StickerTransferBean createFromParcel(Parcel in) {
            return new StickerTransferBean(in);
        }

        @Override
        public StickerTransferBean[] newArray(int size) {
            return new StickerTransferBean[size];
        }
    };

    public int getDayOfWeek() {
        return dayOfWeek;
    }

    public int getMonth() {
        return month;
    }

    public int getDayOfMonth() {
        return dayOfMonth;
    }

    public int getMinute() {
        return minute;
    }

    public int getHour() {
        return hour;
    }

    public int getHourOfDay() {
        return hourOfDay;
    }

    public int getAmPm() {
        return amPm;
    }

    public void setDayOfWeek(int dayOfWeek) {
        this.dayOfWeek = dayOfWeek;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public void setDayOfMonth(int dayOfMonth) {
        this.dayOfMonth = dayOfMonth;
    }

    public void setMinute(int minute) {
        this.minute = minute;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public void setHourOfDay(int hourOfDay) {
        this.hourOfDay = hourOfDay;
    }

    public void setAmPm(int amPm) {
        this.amPm = amPm;
    }

    public void setType(int type) {
        this.type = type;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public int getType() {
        return type;
    }

    public String getFilepath() {
        return filepath;
    }

    public EmojiBean getEmojiBean() {
        return mEmojiBean;
    }

    public RectF getRect() {
        return mRect;
    }

    public float getDegree() {
        return mDegree;
    }

    public void setEmojiBean(EmojiBean emojiBean) {
        mEmojiBean = emojiBean;
    }

    public void setRect(RectF rect) {
        mRect = rect;
    }

    public void setDegree(float degree) {
        mDegree = degree;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(mEmojiBean, flags);
        dest.writeParcelable(mRect, flags);
        dest.writeFloat(mDegree);
        dest.writeInt(type);
        dest.writeString(filepath);
        dest.writeInt(minute);
        dest.writeInt(hour);
        dest.writeInt(hourOfDay);
        dest.writeInt(amPm);
        dest.writeInt(dayOfWeek);
        dest.writeInt(month);
        dest.writeInt(dayOfMonth);

    }
}
